home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1994
/
MacHack 1994.toast
/
MacHack™94
/
Talks & Papers
/
Timothy Knox
/
yerk 3.66
/
Supplement
/
Unsupported
/
Optionals
/
Tasks
< prev
Wrap
Text File
|
1994-06-24
|
719b
|
33 lines
\ add background tasks to Neon
\ 9/29/86 cdn Updated for v2.0 -added curTask & delay
Decimal
0 value delay
0 value nullcnt
0 value curTask
\ the taskList is a queue of background tasks that will be
\ executed whenever there is a null event.
4 Ordered-Col taskList \ up to 4 background tasks
\ add cfa to the task list
: addTask
add: taskList ;
\ remove cfa from the task list
: killTask
indexof: taskList 0= ?error 152
remove: tasklist
curTask size: taskList min -> curTask ;
\ execute the tasks round-robin
: doTask size: taskList 0= IF exit THEN
nullcnt
IF -1 ++> nullcnt exit
ELSE delay -> nullcnt THEN
curTask 1+ size: taskList mod
dup -> curTask
exec: taskList ;
'c doTask setIdle: fWind